- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.5k
fix(dashboard): Include dashboard filters in widget viewer #45106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            wmak
  merged 2 commits into
  master
from
wmak/fix/include-dashboard-filters-in-widget-viewer
  
      
      
   
  Feb 28, 2023 
      
    
                
     Merged
            
            fix(dashboard): Include dashboard filters in widget viewer #45106
                    wmak
  merged 2 commits into
  master
from
wmak/fix/include-dashboard-filters-in-widget-viewer
  
      
      
   
  Feb 28, 2023 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    
      
  
  Member
      
  
  
         wmak
  
      
      
      commented
      
            wmak
  
      
      
      commented
        Feb 24, 2023 
      
    
  
- This updates the widgetviewer to include the top level dashboard filters, specifically so that the top level releases will apply to the widget viewer
- This updates the widgetviewer to include the top level dashboard filters, specifically so that the top level releases will apply to the widget viewer
              
                    wmak
  
              
              commented
              
                  
                    Feb 24, 2023 
                  
              
              
            
            
      Comment on lines
    
      +541
     to 
      +555
    
  
  | export function dashboardFiltersToString( | ||
| dashboardFilters: DashboardFilters | null | undefined | ||
| ): string { | ||
| let dashboardFilterConditions = ''; | ||
| if (dashboardFilters) { | ||
| for (const [key, activeFilters] of Object.entries(dashboardFilters)) { | ||
| if (activeFilters.length === 1) { | ||
| dashboardFilterConditions += `${key}:${activeFilters[0]} `; | ||
| } else if (activeFilters.length > 1) { | ||
| dashboardFilterConditions += `${key}:[${activeFilters.join(',')}] `; | ||
| } | ||
| } | ||
| } | ||
| return dashboardFilterConditions; | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy pasta from static/app/views/dashboards/widgetCard/genericWidgetQueries.tsx so it can be reused to change the query display
| size-limit report 📦
 | 
              
                    narsaynorath
  
              
              approved these changes
              
                  
                    Feb 28, 2023 
                  
              
              
            
            
    
  jan-auer 
      added a commit
      that referenced
      this pull request
    
      Mar 1, 2023 
    
    
      
  
    
      
    
  
* master: (37 commits) ref(ppf): Don't use --commit-batch-size for futures queue length (#45182) feat(codecov-v2): Add more logging (#45225) fix(alerts): Center table items on alert history page (#45226) feat(CapMan): Pass `tenant_ids` to Snuba (#44788) ref(db): Drop `project_id` from Environment (model state) (#45207) chore(profiling): Rename context in profiles task (#45208) feat(replays): Improve index page query performance (#45098) chore(issue assignment): Add logging for`GroupOwner` auto assignment (#45142) fix(hybrid-cloud): Uncache organization when queueing it for deletion (#45213) fix(perf): Navigating to Transaction Summary from Trends widget should persist custom date selection (#45190) fix(pageFilter): Fix overflow (#45169) ref(git hooks): Only suggest autoupdate variable when pulling if not already set (#45179) fix(dashboard): Include dashboard filters in widget viewer (#45106) fix(alerts): Remove null projects from alerts list (#45202) feat(replay): Update Inline replay onboarding img to support dark mode (#45084) __iexact reduce call has default value now. (#45206) feat(replay): Use SDK value for LCP (#44868) chore(hybrid-cloud): breaking foreign keys (#45203) Revert "ref(db): Drop `project_id` from Environment (model state) (#45094)" ref(db): Drop `project_id` from Environment (model state) (#45094) ...
  
      Sign up for free
      to subscribe to this conversation on GitHub.
      Already have an account?
      Sign in.
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.